package org.wu.framework.inner.lazy.orm.spring.config;


import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Role;
import org.wu.framework.inner.lazy.orm.spring.aop.LazyIgnoreSqlInterceptorPointcutAdvisor;

/**
 * 注入 忽略sql拦截注解
 *
 * @author : Jia wei Wu
 * @version 1.0
 * @date : 2021/7/4 6:07 下午
 */
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class LazyIgnoreSqlInterceptorBeanAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
    public LazyIgnoreSqlInterceptorPointcutAdvisor lazyIgnoreSqlInterceptorPointcutAdvisor() {
        LazyIgnoreSqlInterceptorPointcutAdvisor.LazyIgnoreSqlInterceptorInterceptor lazyIgnoreSqlInterceptorInterceptor = new LazyIgnoreSqlInterceptorPointcutAdvisor.LazyIgnoreSqlInterceptorInterceptor();
        return new LazyIgnoreSqlInterceptorPointcutAdvisor(lazyIgnoreSqlInterceptorInterceptor);
    }
}
